package bank.prompt
{
	import bank.BankLandControl;
	import bank.Chest;
	
	import view.panel.prompt.msg.IPromptMsg;
	
	public class PromptMsgChestOpen implements IPromptMsg
	{
		private var bankLandControl:BankLandControl;
		private var _content:String;
		private var chestType:int;
		private var chest:Chest;
		
		public function PromptMsgChestOpen(bankLandControl:BankLandControl,chestType:int,chest:Chest)
		{
			this.chest = chest;
			this.chestType = chestType;
			this.bankLandControl = bankLandControl;
		}
		
		public function set content(v:String):void
		{
			_content = v;
		}
		
		public function get content():String
		{
			return _content;
		}
		
		public function onYes():void
		{
			bankLandControl.sendChestOpen(chestType);
		}
		
		public function onNo():void
		{
			this.chest.mouseEnabled = true;
		}
	}
}